home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3868 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: news2.ios.com!usenet
  2. From: vlad@gramercy.ios.com (Vlastimil Adamovsky)
  3. Newsgroups: comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Considering Switch from Smalltalk to C++
  5. Date: Fri, 26 Jan 1996 14:05:59 GMT
  6. Organization: Internet Online Services
  7. Message-ID: <4eamnf$q16@news2.ios.com>
  8. References: <4e349d$3ol@bigjohn.bmi.net>
  9. NNTP-Posting-Host: ppp-37.ts-7.hck.idt.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Frank Skorina <skorina@bmi.net> wrote:
  13.  
  14. >This post is to solicit opinions on our situation, especially from people who have 
  15. >developed applications similar to our own.  We would be interested in information
  16. >from those who have made the switch.
  17.  
  18. It can be both easy and difficult:
  19.  
  20.  a) if you have clearly separeted your application code from the GUI
  21.  
  22.     code, then you should not get any problems. It means, your    
  23.    application should not know anything about the the implementation 
  24.    of the GUI. 
  25.    Your code should not call aCheckButton->check().
  26.    It is better to call:   
  27.         MySeparationLayer.buttonAt("myCheckButton")->check().
  28.    etc....
  29.  
  30. b) If you use  class as a first class object, then you need some   
  31.     redesign:
  32.        *) in Smalltalk you write:
  33.  
  34.                   ^MyStuff defaultClass new
  35.    
  36.          and you will get an instance (for example) of class Printer 
  37.          if the implementation of the method "defaultClass" is:
  38.  
  39.           defaultClass
  40.               ^Printer
  41.  
  42.      Try to do it in C++
  43.  
  44. c) In Smalltalk you can send messages to a variable that references 
  45.    some object of uknown class.
  46.  
  47.    In C++ you must define at least some superclass to be able to call
  48.  
  49.    member functions.
  50.  
  51. d) etc....
  52.  
  53. Though it is not impossible to "port" Smalltalk code to C++ code.
  54.  
  55. The above mentioned things prove that design is language dependent
  56. despite of commonly accepted believe.
  57.  
  58.  
  59.  
  60.  
  61.          
  62.  
  63.     
  64.     
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. *******************************************
  72. *    Vlastimil Adamovsky                  *
  73. * Smalltalk, C++ and Envelop development  *
  74. *******************************************
  75.  
  76.